import request from '@/utils/request'

// 查询整改检查列表
export const getDangerList = (params) => {
  return request({
    method: 'get',
    url: '/inspection/danger/list',
    params,
  })
}

// 申请整改
export const dangerApply = (data) => {
  return request({
    method: 'post',
    url: '/inspection/danger/apply',
    data,
  })
}

// 申请审批
export const dangerCheck = (data) => {
  return request({
    method: 'post',
    url: '/inspection/danger/checkCost',
    data,
  })
}

// 结果确认
export const dangerResult = (data) => {
  return request({
    method: 'post',
    url: '/inspection/danger/checkResult',
    data,
  })
}

// 关闭整改
export const dangerClose = (data) => {
  return request({
    method: 'post',
    url: '/inspection/danger/close',
    params: data,
  })
}

// 整改日志
export const dangerLog = (params) => {
  return request({
    method: 'get',
    url: '/inspection/danger/repairLog',
    params,
  })
}

// 整改任务列表
export const dangerTaskList = (params) => {
  return request({
    method: 'get',
    url: '/inspection/danger/task',
    params,
  })
}

// 整改结果
export const dangerCheckResult = (data) => {
  return request({
    method: 'post',
    url: '/inspection/danger/checkResult',
    data,
  })
}
